//
//  ViewController.m
//  新项目
//
//  Created by 刘耀宗 on 2016/10/21.
//  Copyright © 2016年 刘耀宗. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

// 去appStore评分
-(void)gotoUrl
{
    int appID = 1044973253;
    NSString *str = [NSString stringWithFormat:
                     @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",appID];
    if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)){
        str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%d",appID];
    }
    
   [[UIApplication sharedApplication]openURL:[NSURL URLWithString:str]];

}

@end
